1. Field of the Invention
The present invention relates generally to computer peripheral device drivers, and more particularly to error recovery modules in computer peripheral device drivers.
2. Description of the Related Art
Many, if not most, computer systems provide for linking a host computer operating system to one or more peripheral devices which are used as data storage media. For example, the AIX and OS/2 operating systems made by International Business Machines Corporation of Armonk, N.Y. can interface with several different types of data storage peripheral devices that have a so-called Small Computer System Interface (SCSI) interface format.
Included among SCSI devices are magnetic tape data storage devices, magnetic disk data storage devices, and optical disk data storage devices. Also included among SCSI devices are medium changer library devices, each of which contains several data storage devices. In medium changer devices, one of the data storage disks at a time can be selected and then engaged with a transport element within the device for accessing data of a storage device.
Indeed, a multiplicity of data storage devices are made by various manufacturers, each of which may transfer data in accordance with its own unique operating command sequence. It is nonetheless desirable that a host operating system be capable of communicating with as many different types of data storage devices as possible, so as not to unduly restrict the ability of the operating system to interact with available data storage devices.
Accordingly, to permit the host operating system to communicate with several different types of data storage devices, the host operating system ordinarily includes software modules referred to as device drivers. For each data storage device sought to be used by the host operating system, the host operating system must include an associated device driver which is tailored for communicating with the particular device. Thus, each device driver functions as an intermediary between the operating system and the data storage device that is associated with the device driver. More particularly, the device driver receives input/output (I/O) requests from the operating system and then issues commands to its associated data storage device to satisfy the I/O requests.
An important function of a device driver is error recovery. More specifically, a data storage device may from time to time experience an error condition that impedes I/O from the device, and the device driver must provide error recovery support.
When a data storage device experiences an error condition, it generates a string of data, referred to as sense bytes, which represent the error condition, and the sense bytes are sent to the device driver. Based on the sense bytes, the device driver determines what error recovery action is appropriate given the particular error and the particular device, e.g., reset, retry, etc.
It is not unusual that while some commonality may exist between sense byte formats used by various data storage devices, what commonality does exist provides only a coarse, general indication of the error. Specific error indication can be provided only by reading the entire sense byte string, and, like other I/O functions performed by a particular data storage device, most of the sense byte string of a device may be unique to the particular device. Accordingly, the error recovery portion of a device driver must be tailored for the particular device to ascertain the nature of the reported error with satisfactory granularity.
Thus, for each type of data storage device sought to be used by an operating system, the operating system must include an associated device driver. It will be appreciated that each device driver must in turn include an error recovery module that is designed for the particular device. Unfortunately, such duplication of system design effort is time-consuming and costly.
As recognized by the present invention, however, while a particular data storage device may report error conditions using a sense byte format which is unique to the particular device, the underlying error conditions and required recovery actions for data storage devices of a particular type (e.g., tape drive, optical disk, or media changer) tend to be the same, device to device. Accordingly, it is an object of the present invention to provide an error recovery module that can be used interchangeably with many different types of device drivers, thereby avoiding duplicative system design. Another object of the present invention is to provide an error recovery module that can ascertain the nature of a reported error with satisfactory granularity. Still another object of the present invention is to provide an error recovery module which is easy to use and cost-effective.